package com.yizhi.student.service.impl;


import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;

import com.yizhi.student.dao.StudentInfoDao;
import com.yizhi.student.domain.StudentInfoDO;
import com.yizhi.student.service.StudentInfoService;



@Service
public class StudentInfoServiceImpl  implements StudentInfoService {



	@Autowired
	private StudentInfoDao studentInfoDao;
//	@Autowired
//	private StudentInfoDOBaseMapper studentInfoDOBaseMapper;
	
	@Override
	public StudentInfoDO get(Integer id){
		System.out.println("======service层中传递过来的id参数是：" + id + "======");
		return studentInfoDao.get(id);
	}

	@Override
	public List<StudentInfoDO> list(Map<String, Object> map){
		List<StudentInfoDO> list = studentInfoDao.list(map);
		return list;
	}


//	@Override
//	public List<StudentInfoDO> list(Map<String, Object> map){
//		StudentInfoDO studentInfoDO = new StudentInfoDO();
//
////		LambdaQueryWrapper<StudentInfoDO> queryWrapper = new LambdaQueryWrapper<StudentInfoDO>()
////				.like(StringUtils.isNotEmpty(studentInfoDO.getStudentName()),StudentInfoDO::getStudentName,map.get("name"))
////				.eq((studentInfoDO.getTomajor() != null),StudentInfoDO::getTomajor,map.get("tomajor"))
////				.eq(StudentInfoDO::getTocollege,map.get("tocollege"));
////
////		com.baomidou.mybatisplus.extension.plugins.pagination.Page<StudentInfoDO> page =
////				new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>((Long) map.get("currPage"),(Long) map.get("pageSize"));
////
////		IPage<StudentInfoDO> pageResult = studentInfoDOBaseMapper.selectPage(page, queryWrapper);
////
////		List<StudentInfoDO> items = pageResult.getRecords();
//		return null;
//	}

	//"===================================================================================="


	@Override
	public int count(Map<String, Object> map){
		return studentInfoDao.count(map);
	}

	@Override
	public int save(StudentInfoDO studentInfo){
		return studentInfoDao.save(studentInfo);
	}

	@Override
	public int update(StudentInfoDO studentInfo){
		return studentInfoDao.update(studentInfo);
	}

	@Override
	public int remove(Integer id){
		return studentInfoDao.remove(id);
	}

	@Override
	public int batchRemove(Integer[] ids){
		return studentInfoDao.batchRemove(ids);
	}

}
